﻿@model  TS2015.Models.TbThiSinh
@using System.Data.Entity
@using TS2015.Models
@if (Model != null)
{
    var TbDiemTotNghiep = (IEnumerable<TbDiemTotNghiep>)ViewBag.TbDiemTotNghiep;
    TbDiemTotNghiep = TbDiemTotNghiep.OrderBy(e => e.MaMon);
    using (Html.BeginForm("UpdateDiem", "CandidateManagement", FormMethod.Post))
    {
        @Html.ValidationSummary(true)
        @Html.AntiForgeryToken()
        @Html.ValidationMessage("Error")
        <input type="hidden" name="MaTS" value="@Model.MaTS" />
        <h3>Sửa điểm thí sinh @Model.MaTS</h3>
        <hr />
        <div class="form-group">
            <strong>Điểm THPT :</strong><br />
            <div class="col-lg-4 col-md-4">
                <div class="col-lg-4 col-md-4">
                    <div class="row"><strong>Điểm lớp 10:</strong></div>
                </div>
                <div class="col-lg-3 col-md-3">
                    @Html.TextBoxFor(m => m.DiemLop10, new { @class = "form-control", type = "number" })
                </div>
            </div>
            <div class="col-lg-4 col-md-4">
                <div class="col-lg-4 col-md-4">
                    <div class="row"><strong>Điểm lớp 11:</strong></div>
                </div>
                <div class="col-lg-3 col-md-3">
                    @Html.TextBoxFor(m => m.DiemLop11, new { @class = "form-control", type = "number" })
                </div>
            </div>
            <div class="col-lg-4 col-md-4">
                <div class="col-lg-4 col-md-4">
                    <div class="row"><strong>Điểm lớp 12:</strong></div>
                </div>
                <div class="col-lg-3 col-md-3">
                    @Html.TextBoxFor(m => m.DiemLop12, new { @class = "form-control", type = "number" })
                </div>
            </div>
        </div>

        <div id="University">
            <div class="form-group">
                <strong>Điểm Tốt nghiệp :</strong><br />

                @foreach (var item in TbDiemTotNghiep)
                {
                    <div class="col-lg-4 col-md-4">
                        <div class="col-lg-4 col-md-4">
                            <div class="row"><strong>@item.TbMonTotNghiep.TenMon:</strong></div>
                        </div>
                        <div class="col-lg-3 col-md-3">
                            @Html.TextBox("Mark", item.Diem, new { @class = "form-control", type = "number" })
                            <input type="text" name="Subject" class="hide" value="@item.MaMon" />
                        </div>
                    </div>
                }
            </div>
        </div>
        <hr />
        <div class="form-group col-md-12">
            <button type="submit" class="btn btn-danger">Sửa</button>
            <a href="/Admin/CandidateManagement/QuanLyDiem" class="btn btn-danger">Quay lại</a>
        </div>
    }
}
else
{
    @Html.ValidationMessage("Error")
}
